#define _CRT_SECURE_NO_WARNINGS 1
//#include <fstream>
//#include <iostream>
//#include <string>
//#include <sstream>
//#include<vector>
//#include<algorithm>
//using namespace std;
#include<stdio.h>
#include<math.h>
int check()
{
    struct Check {
        int a:1;
        char b;
    };
    struct Check* test;
    test->a = 1;
    return test->b;
}



int main1() {
    int i = 10000;
    for (i = 10000; i <= 99999; i++)
    {
        int front = 0, latter = 0;
        int num = 0;
        int front_len = 1;
        while (front_len <= 4)
        {
            front = i / (int)pow(10, 5 - front_len);
            latter = i % (int)pow(10, 5 - front_len);
            num += front * latter;
            front_len++;
        }

        if (num == i)
            printf("%d ", i);
    }
    return 0;
}